package cn.doctor.assistant.pad.entity;

import com.alibaba.fastjson.JSON;

import java.io.Serializable;

/**
 * Created by jiaolf on 2016/3/30.
 */
public class Patient implements Serializable{
    private int id;
    private String name;
    private String sex; // 0 未知  1 男  2 女
    private String phone;
    private String birthday;
    private int marriage; // 0 未知  1 未婚  2 已婚
    private String address;
    private String note;

    public String getSexString() {
        String s = "未知";
        if (sex.equals("1")) {
            s = "男";
        }else if (sex.equals("2")) {
            s = "女";
        }
        return s;
    }

    public String getMarriageString() {
        String s = "未知";
        if (marriage == 1) {
            s = "未婚";
        }else if (marriage == 2) {
            s = "已婚";
        }
        return s;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public int getMarriage() {
        return marriage;
    }

    public void setMarriage(int marriage) {
        this.marriage = marriage;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
